package concurrecy;

public class IncrementDemo {

    private int a = 0;
    private volatile int b = 0;

    void test1() {
        a ++;
        System.out.println(a);
    }

    void test2() {
        b  ++;
        System.out.println(b);
    }

    public static void main(String[] args) {
        IncrementDemo demo = new IncrementDemo();
        demo.test1();
        demo.test2();
    }
}
